package org.dromara.system.domain.bo;

import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.system.domain.SysAccount;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.io.Serial;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 账号业务对象 sys_account
 *
 * @author yilong.fu
 * @date 2024-09-14
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysAccount.class, reverseConvertGenerate = false)
public class SysAccountBo extends BaseEntity {

    @Serial
    private static final long serialVersionUID = -1217116337753757576L;
    /**
     *
     */
    @NotNull(message = "不能为空", groups = {EditGroup.class})
    private Long accountId;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String name;

    /**
     * 微信账号
     */
    @NotBlank(message = "微信账号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String code;

    /**
     * 账号状态：0: 停用。1: 启用
     */
    @NotBlank(message = "账号状态：0: 停用。1: 启用不能为空", groups = {AddGroup.class, EditGroup.class})
    private String status;

    /**
     * TOKEN
     */
    @NotBlank(message = "TOKEN不能为空", groups = {AddGroup.class, EditGroup.class})
    private String token;

    /**
     * 类型：1: 公众号 2: 小程序 3: 企业号
     */
    @NotBlank(message = "类型：1: 公众号 2: 小程序 3: 企业号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String type;

    /**
     * 微信APPID
     */
    @NotBlank(message = "微信APPID不能为空", groups = {AddGroup.class, EditGroup.class})
    private String wxAppId;

    /**
     * 微信APP秘钥
     */
    @NotBlank(message = "微信APP秘钥不能为空", groups = {AddGroup.class, EditGroup.class})
    private String wxAppSecret;

    /**
     * ACCESS_TOKEN
     */
    @NotBlank(message = "ACCESS_TOKEN不能为空", groups = {AddGroup.class, EditGroup.class})
    private String accessToken;

    /**
     * 刷新时间
     */
    @NotNull(message = "刷新时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date refreshTime;

    /**
     * JS TICKET
     */
    @NotBlank(message = "JS TICKET不能为空", groups = {AddGroup.class, EditGroup.class})
    private String jsApiTicket;

    /**
     * JS刷新时间
     */
    @NotNull(message = "JS刷新时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date jsRefreshTime;

    /**
     * 微信秘钥
     */
    @NotBlank(message = "微信秘钥不能为空", groups = {AddGroup.class, EditGroup.class})
    private String aesKey;

    /**
     * 商户号
     */
    @NotBlank(message = "商户号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String merchantCode;

    /**
     * 商户支付秘钥
     */
    @NotBlank(message = "商户支付秘钥不能为空", groups = {AddGroup.class, EditGroup.class})
    private String merchantKey;

    /**
     * 通知地址
     */
    @NotBlank(message = "通知地址不能为空", groups = {AddGroup.class, EditGroup.class})
    private String notifyUrl;

    /**
     * 应用编号
     */
    @NotBlank(message = "应用编号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String appCode;


}
